package cn.kgc.lambda;

import java.util.ArrayList;
import java.util.Collections;
import java.util.function.Consumer;

/**
 * @author: mosin
 * @version: v1.0  2022/10/20
 */
public class LambdaDemo04 {


    public static void main(String[] args) {

        ArrayList<Integer> list = new ArrayList();

        Collections.addAll(list,1,2,3,4,45,5);

        // 遍历集合
        //list.forEach(ele -> System.out.println("ele = " + ele));

        // 方法的引用
        list.forEach(System.out::println);



    }
}
